package com.gxa.xx.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface LocationDao {

    @Select("select id, name from china where pid=0 and id<>0")
    List<Map<String, String>> getProvinces();

//    @Select("select id, name from china where pid=0 and id<>0")
//    List<Map<String, String>> getCities();
//
//    @Select("select id, name from china where pid=0 and id<>0")
//    List<Map<String, String>> getBlox qcks();

    @Select("select id, name from china where pid=#{province}")
    List<Map<String, String>> getCities(String province);

    @Select("select id, name from china where pid=#{city}")
    List<Map<String, String>> getBlocks(String city);
}
